<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="/startbootstrap/css/bootstrap.min.css" rel="stylesheet">
    <title>后台管理系统</title>
    <jsp:include page="common/header2.jsp"/>
    <script type="text/javascript">
        //弹出一个iframe层
        function openEditWindow(btn) {
            layer.open({
                type: 2,
                title: 0,
                shadeClose: true, //点击遮罩关闭层
                area: ['540px', '550px'],
                content: '/admin/tLoanPlatform/edit?id=' + btn.value
            });
        }
        ;
    </script>
</head>

<body>

<div class="layui-tab-content site-demo site-demo-body">
    <br/>
    <!--异步提交表单，伪ajax。-->
    <form id="commonPostForm" method="post" target="commonPostIframe">
    </form>
    <iframe width="0" height="0" style="display:none;" name="commonPostIframe"></iframe>
    <fieldset class="layui-elem-field layui-field-title">
        <legend>贷款平台管理</legend>
        <div class="layui-field-box">
            <blockquote class="layui-elem-quote">
                <button class="btn btn-sm btn-success" onclick="openEditWindow(this)">添加贷款平台</button>
            </blockquote>
            <table class="layui-table">
                <thead>
                <tr>
                    <th>编号</th>
                        <th>贷款APP名称</th>
                        <th>LOGO地址</th>
                        <th>类型1:API，2:H5</th>
                        <th>类型为API时，API模板类</th>
                        <th>类型为H5时为H5的链接地址或API地址</th>
                        <th>贷款最小金额</th>
                        <th>贷款最大金额</th>
                        <th>还款类型1:日还，2:月还，3:日月还</th>
                        <th>还款方式编码（查询字典）</th>
                        <th>贷款最小日或月</th>
                        <th>贷款最大日或月</th>
                        <th>贷款最小利率</th>
                        <th>贷款最大利率</th>
                        <th>最快放款时间（单位分）</th>
                        <th>支持地区说明</th>
                        <th>是否新品(0:否，1是)</th>
                        <th>是否发布1发布，0不发布</th>
                        <th>平台描述(平台简介)</th>
                        <th>联系人</th>
                        <th>联系电话</th>
                        <th>是否有砍头息</th>
                        <th>逾期描述</th>
                        <th>提前还款说明</th>
                        <th>其他费用说明</th>
                        <th>上线时间</th>
                        <th>创建时间</th>
                        <th>贷款成功率</th>
                        <th>导流总数</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>

                <c:if test="${!empty page.result}">
                    <c:forEach var="entity" items="${page.result}" varStatus="status">
                        <tr class="active">
                            <td class="h6">${entity.id}</td>
                                <td class="h6">${entity.platformName}</td>
                                <td class="h6">${entity.logoUrl}</td>
                                <td class="h6">${entity.platformType}</td>
                                <td class="h6">${entity.apiTemplate}</td>
                                <td class="h6">${entity.linkUrl}</td>
                                <td class="h6">${entity.minLoanLimit}</td>
                                <td class="h6">${entity.maxLoanLimit}</td>
                                <td class="h6">${entity.repaymentType}</td>
                                <td class="h6">${entity.modeType}</td>
                                <td class="h6">${entity.minLoanNum}</td>
                                <td class="h6">${entity.maxLoanNum}</td>
                                <td class="h6">${entity.minInterestRate}</td>
                                <td class="h6">${entity.maxInterestRate}</td>
                                <td class="h6">${entity.fastestTime}</td>
                                <td class="h6">${entity.supportArea}</td>
                                <td class="h6">${entity.isNew}</td>
                                <td class="h6">${entity.isRelease}</td>
                                <td class="h6">${entity.remark}</td>
                                <td class="h6">${entity.userName}</td>
                                <td class="h6">${entity.phone}</td>
                                <td class="h6">${entity.isHeadrest}</td>
                                <td class="h6">${entity.beoverdueDesc}</td>
                                <td class="h6">${entity.prepaymentDesc}</td>
                                <td class="h6">${entity.otherDesc}</td>
                                <td class="h6">${entity.onlineTime}</td>
                                <td class="h6">${entity.createTime}</td>
                                <td class="h6">${entity.successRate}</td>
                                <td class="h6">${entity.totalDiversion}</td>
                            <td class="h6">
                                <button type="button" onclick="openEditWindow(this)" value="${entity.id}"
                                        class="btn btn-xs btn-info">
                                    修改
                                </button>
                                <button type="button"
                                        onclick="commonDeleteConfirm('/admin/tLoanPlatform/delete?id=${entity.id}')"
                                        class="btn btn-xs btn-danger">
                                    删除
                                </button>
                            </td>
                        </tr>
                    </c:forEach>
                </c:if>
                </tbody>
            </table>
            <div id="page-content">
                <ul id="pagination-demo" class="pagination-sm"></ul>
            </div>
        </div>
        <!-- /.table-responsive -->
    </fieldset>
</div>
<!-- /.panel-body -->
</div>

<!-- /#wrapper -->
<script type="application/javascript">
    var total = ${page.pageCount};
    var href = '/admin/tLoanPlatform/list?currentPage={{number}}';
</script>
<script src="/js/page.js"></script>

</body>
</html>
